home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / sort2.zip / WORDS.PAS < prev   
Pascal/Delphi Source File  |  1993-01-04  |  335b  |  9 lines

  1. program words;
  2. { lists all words in input, one per line }
  3. var s,w: string; i,j:integer;
  4. begin
  5. w:=''; while not eof do begin
  6.    readln(s); for i:=1 to length(s) do
  7.       if s[i] in ['A'..'Z','a'..'z'] then w:=w+s[i]
  8.       else if w<>'' then begin writeln(w); w:=''; end;
  9.    if w<>'' then begin writeln(w); w:=''; end; end; end.